Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(config)!: support regex in 'tag_pattern' configuration #318

Merged
merged 6 commits into from
Oct 29, 2023

Conversation

woshilapin
Copy link
Contributor

@woshilapin woshilapin commented Oct 15, 2023

resolves #289

Description

Change how the configuration works about tag_pattern. It was only supporting glob patterns for matching (mostly due to the underlying support of such glob by git2). Now, it should directly support Regex.

Motivation and Context

Closes #289.

How Has This Been Tested?

An existing test had to be modified after the change.
Another test has been added to test more explicitly the modification.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

I believe this is a breaking change, since all existing configurations may now break (if it's not parsable as a valid regular expression). I created the commit accordingly (conventional commit).

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have formatted the code with rustfmt.
  • I checked the lints with clippy.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@woshilapin woshilapin requested a review from orhun as a code owner October 15, 2023 20:09
@codecov-commenter
Copy link

codecov-commenter commented Oct 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Files Coverage Δ
git-cliff-core/src/config.rs 41.67% <ø> (ø)
git-cliff-core/src/repo.rs 54.55% <100.00%> (+1.72%) ⬆️

📢 Thoughts on this report? Let us know!.

@woshilapin woshilapin force-pushed the feat/regex-tag_pattern branch 3 times, most recently from 0fababf to 19da127 Compare October 21, 2023 05:15
BREAKING CHANGE: `tag_pattern` now takes a valid regular expression instead of a glob pattern

resolves orhun#289
@woshilapin woshilapin force-pushed the feat/regex-tag_pattern branch from 19da127 to 8fee4c0 Compare October 27, 2023 08:08
Copy link
Owner

@orhun orhun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks!

@orhun orhun changed the title feat(config): support 'Regex' in 'tag_pattern' configuration feat(config)!: support regex in 'tag_pattern' configuration Oct 29, 2023
@orhun orhun merged commit 3c2fb60 into orhun:main Oct 29, 2023
23 of 25 checks passed
inglor pushed a commit to archlinux/aurweb that referenced this pull request Dec 8, 2023
Changed with v1.4.0
See: orhun/git-cliff#318

Signed-off-by: moson <moson@archlinux.org>
@orhun orhun mentioned this pull request Dec 30, 2023
zedseven added a commit to zedseven/breeze that referenced this pull request Jan 17, 2024
zedseven added a commit to zedseven/clog that referenced this pull request Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use regex for tag_pattern
3 participants